home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / u_man / cat3 / Tk / bind.z / bind
Encoding:
Text File  |  1998-10-30  |  32.0 KB  |  463 lines

  1.  
  2.  
  3.  
  4. bbbbiiiinnnndddd((((3333TTTTkkkk))))                                                            bbbbiiiinnnndddd((((3333TTTTkkkk))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      bind - Arrange for X events to invoke Tcl scripts
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      bbbbiiiinnnndddd _t_a_g
  13.      bbbbiiiinnnndddd _t_a_g _s_e_q_u_e_n_c_e
  14.      bbbbiiiinnnndddd _t_a_g _s_e_q_u_e_n_c_e _s_c_r_i_p_t
  15.      bbbbiiiinnnndddd _t_a_g _s_e_q_u_e_n_c_e ++++_s_c_r_i_p_t
  16.  
  17.  
  18. IIIINNNNTTTTRRRROOOODDDDUUUUCCCCTTTTIIIIOOOONNNN
  19.      The bbbbiiiinnnndddd command associates Tcl scripts with X events.  If all three
  20.      arguments are specified, bbbbiiiinnnndddd will arrange for _s_c_r_i_p_t (a Tcl script) to
  21.      be evaluated whenever the event(s) given by _s_e_q_u_e_n_c_e occur in the
  22.      window(s) identified by _t_a_g.  If _s_c_r_i_p_t is prefixed with a ``+'', then it
  23.      is appended to any existing binding for _s_e_q_u_e_n_c_e;  otherwise _s_c_r_i_p_t
  24.      replaces any existing binding.  If _s_c_r_i_p_t is an empty string then the
  25.      current binding for _s_e_q_u_e_n_c_e is destroyed, leaving _s_e_q_u_e_n_c_e unbound.  In
  26.      all of the cases where a _s_c_r_i_p_t argument is provided, bbbbiiiinnnndddd returns an
  27.      empty string.
  28.  
  29.      If _s_e_q_u_e_n_c_e is specified without a _s_c_r_i_p_t, then the script currently
  30.      bound to _s_e_q_u_e_n_c_e is returned, or an empty string is returned if there is
  31.      no binding for _s_e_q_u_e_n_c_e.  If neither _s_e_q_u_e_n_c_e nor _s_c_r_i_p_t is specified,
  32.      then the return value is a list whose elements are all the sequences for |
  33.      which there exist bindings for _t_a_g.                                      |
  34.  
  35.      The _t_a_g argument determines which window(s) the binding applies to.  If  |
  36.      _t_a_g begins with a dot, as in ....aaaa....bbbb....cccc, then it must be the path name for a |
  37.      window; otherwise it may be an arbitrary string.  Each window has an     |
  38.      associated list of tags, and a binding applies to a particular window if |
  39.      its tag is among those specified for the window.  Although the bbbbiiiinnnnddddttttaaaaggggssss  |
  40.      command may be used to assign an arbitrary set of binding tags to a      |
  41.      window, the default binding tags provide the following behavior:
  42.  
  43.           If a tag is the name of an internal window the binding applies to
  44.           that window.
  45.  
  46.           If the tag is the name of a toplevel window the binding applies to
  47.           the toplevel window and all its internal windows.
  48.  
  49.           If the tag is the name of a class of widgets, such as BBBBuuuuttttttttoooonnnn, the
  50.           binding applies to all widgets in that class;
  51.  
  52.           If _t_a_g has the value aaaallllllll, the binding applies to all windows in the
  53.           application.
  54.  
  55.  
  56. EEEEVVVVEEEENNNNTTTT PPPPAAAATTTTTTTTEEEERRRRNNNNSSSS
  57.      The _s_e_q_u_e_n_c_e argument specifies a sequence of one or more event patterns,
  58.      with optional white space between the patterns.  Each event pattern may
  59.      take either of two forms.  In the simplest case it is a single printing
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. bbbbiiiinnnndddd((((3333TTTTkkkk))))                                                            bbbbiiiinnnndddd((((3333TTTTkkkk))))
  71.  
  72.  
  73.  
  74.      ASCII character, such as aaaa or [[[[.  The character may not be a space
  75.      character or the character <<<<.  This form of pattern matches a KKKKeeeeyyyyPPPPrrrreeeessssssss
  76.      event for the particular character.  The second form of pattern is longer
  77.      but more general.  It has the following syntax:
  78.  
  79.           <<<<_m_o_d_i_f_i_e_r-_m_o_d_i_f_i_e_r-_t_y_p_e-_d_e_t_a_i_l>>>>
  80.  
  81.      The entire event pattern is surrounded by angle brackets.  Inside the
  82.      angle brackets are zero or more modifiers, an event type, and an extra
  83.      piece of information (_d_e_t_a_i_l) identifying a particular button or keysym.
  84.      Any of the fields may be omitted, as long as at least one of _t_y_p_e and
  85.      _d_e_t_a_i_l is present.  The fields must be separated by white space or
  86.      dashes.
  87.  
  88.  
  89. MMMMOOOODDDDIIIIFFFFIIIIEEEERRRRSSSS
  90.      Modifiers consist of any of the following values:                        |
  91.  
  92.           CCCCoooonnnnttttrrrroooollll                 MMMMoooodddd2222,,,, MMMM2222                                    |
  93.           SSSShhhhiiiifffftttt                   MMMMoooodddd3333,,,, MMMM3333                                    |
  94.           LLLLoooocccckkkk                    MMMMoooodddd4444,,,, MMMM4444                                    |
  95.           BBBBuuuuttttttttoooonnnn1111,,,, BBBB1111             MMMMoooodddd5555,,,, MMMM5555                                    |
  96.           BBBBuuuuttttttttoooonnnn2222,,,, BBBB2222             MMMMeeeettttaaaa,,,, MMMM                                     |
  97.           BBBBuuuuttttttttoooonnnn3333,,,, BBBB3333             AAAAlllltttt                                         |
  98.           BBBBuuuuttttttttoooonnnn4444,,,, BBBB4444             DDDDoooouuuubbbblllleeee                                      |
  99.           BBBBuuuuttttttttoooonnnn5555,,,, BBBB5555             TTTTrrrriiiipppplllleeee                                      |
  100.           MMMMoooodddd1111,,,, MMMM1111                                                            |
  101.  
  102.      Where more than one value is listed, separated by commas, the values are |
  103.      equivalent.  Most of the modifiers have the obvious X meanings.  For     |
  104.      example, BBBBuuuuttttttttoooonnnn1111 requires that button 1 be depressed when the event      |
  105.      occurs.  For a binding to match a given event, the modifiers in the event|
  106.      must include all of those specified in the event pattern.  An event may  |
  107.      also contain additional modifiers not specified in the binding.  For     |
  108.      example, if button 1 is pressed while the shift and control keys are     |
  109.      down, the pattern <<<<CCCCoooonnnnttttrrrroooollll----BBBBuuuuttttttttoooonnnn----1111>>>> will match the event, but <<<<MMMMoooodddd1111----    |
  110.      BBBBuuuuttttttttoooonnnn----1111>>>> will not.  If no modifiers are specified, then any combination |
  111.      of modifiers may be present in the event.                                |
  112.  
  113.      MMMMeeeettttaaaa and MMMM refer to whichever of the MMMM1111 through MMMM5555 modifiers is          |
  114.      associated with the meta key(s) on the keyboard (keysyms MMMMeeeettttaaaa____RRRR and      |
  115.      MMMMeeeettttaaaa____LLLL).  If there are no meta keys, or if they are not associated with  |
  116.      any modifiers, then MMMMeeeettttaaaa and MMMM will not match any events.  Similarly, the|
  117.      AAAAlllltttt modifier refers to whichever modifier is associated with the alt     |
  118.      key(s) on the keyboard (keysyms AAAAlllltttt____LLLL and AAAAlllltttt____RRRR).
  119.  
  120.      The DDDDoooouuuubbbblllleeee and TTTTrrrriiiipppplllleeee modifiers are a convenience for specifying double
  121.      mouse clicks and other repeated events. They cause a particular event
  122.      pattern to be repeated 2 or 3 times, and also place a time and space
  123.      requirement on the sequence:  for a sequence of events to match a DDDDoooouuuubbbblllleeee
  124.      or TTTTrrrriiiipppplllleeee pattern, all of the events must occur close together in time
  125.      and without substantial mouse motion in between.  For example, <<<<DDDDoooouuuubbbblllleeee----
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. bbbbiiiinnnndddd((((3333TTTTkkkk))))                                                            bbbbiiiinnnndddd((((3333TTTTkkkk))))
  137.  
  138.  
  139.  
  140.      BBBBuuuuttttttttoooonnnn----1111>>>> is equivalent to <<<<BBBBuuuuttttttttoooonnnn----1111>>>><<<<BBBBuuuuttttttttoooonnnn----1111>>>> with the extra time and
  141.      space requirement.
  142.  
  143.  
  144. EEEEVVVVEEEENNNNTTTT TTTTYYYYPPPPEEEESSSS
  145.      The _t_y_p_e field may be any of the standard X event types, with a few extra
  146.      abbreviations.  Below is a list of all the valid types; where two names
  147.      appear together, they are synonyms.
  148.  
  149.           BBBBuuuuttttttttoooonnnnPPPPrrrreeeessssssss,,,, BBBBuuuuttttttttoooonnnn EEEExxxxppppoooosssseeee             MMMMaaaapppp                          |
  150.           BBBBuuuuttttttttoooonnnnRRRReeeelllleeeeaaaasssseeee       FFFFooooccccuuuussssIIIInnnn            MMMMoooottttiiiioooonnnn                       |
  151.           CCCCiiiirrrrccccuuuullllaaaatttteeee           FFFFooooccccuuuussssOOOOuuuutttt           PPPPrrrrooooppppeeeerrrrttttyyyy                     |
  152.           CCCCoooolllloooorrrrmmmmaaaapppp            GGGGrrrraaaavvvviiiittttyyyy            RRRReeeeppppaaaarrrreeeennnntttt                     |
  153.           CCCCoooonnnnffffiiiigggguuuurrrreeee           KKKKeeeeyyyyPPPPrrrreeeessssssss,,,, KKKKeeeeyyyy      UUUUnnnnmmmmaaaapppp                        |
  154.           DDDDeeeessssttttrrrrooooyyyy             KKKKeeeeyyyyRRRReeeelllleeeeaaaasssseeee         VVVViiiissssiiiibbbbiiiilllliiiittttyyyy                   |
  155.           EEEEnnnntttteeeerrrr               LLLLeeeeaaaavvvveeee
  156.  
  157.  
  158.      The last part of a long event specification is _d_e_t_a_i_l.  In the case of a
  159.      BBBBuuuuttttttttoooonnnnPPPPrrrreeeessssssss or BBBBuuuuttttttttoooonnnnRRRReeeelllleeeeaaaasssseeee event, it is the number of a button (1-5).
  160.      If a button number is given, then only an event on that particular button
  161.      will match;  if no button number is given, then an event on any button
  162.      will match.  Note:  giving a specific button number is different than
  163.      specifying a button modifier; in the first case, it refers to a button
  164.      being pressed or released, while in the second it refers to some other
  165.      button that is already depressed when the matching event occurs.  If a
  166.      button number is given then _t_y_p_e may be omitted:  if will default to
  167.      BBBBuuuuttttttttoooonnnnPPPPrrrreeeessssssss.  For example, the specifier <<<<1111>>>> is equivalent to
  168.      <<<<BBBBuuuuttttttttoooonnnnPPPPrrrreeeessssssss----1111>>>>.
  169.  
  170.      If the event type is KKKKeeeeyyyyPPPPrrrreeeessssssss or KKKKeeeeyyyyRRRReeeelllleeeeaaaasssseeee, then _d_e_t_a_i_l may be specified
  171.      in the form of an X keysym.  Keysyms are textual specifications for
  172.      particular keys on the keyboard; they include all the alphanumeric ASCII
  173.      characters (e.g. ``a'' is the keysym for the ASCII character ``a''), plus
  174.      descriptions for non-alphanumeric characters (``comma'' is the keysym for
  175.      the comma character), plus descriptions for all the non-ASCII keys on the
  176.      keyboard (``Shift_L'' is the keysm for the left shift key, and ``F1'' is
  177.      the keysym for the F1 function key, if it exists).  The complete list of
  178.      keysyms is not presented here;  it is available in other X documentation
  179.      and may vary from system to system.  If necessary, you can use the %%%%KKKK
  180.      notation described below to print out the keysym name for a particular
  181.      key.  If a keysym _d_e_t_a_i_l is given, then the _t_y_p_e field may be omitted;
  182.      it will default to KKKKeeeeyyyyPPPPrrrreeeessssssss.  For example, <<<<CCCCoooonnnnttttrrrroooollll----ccccoooommmmmmmmaaaa>>>> is equivalent
  183.      to <<<<CCCCoooonnnnttttrrrroooollll----KKKKeeeeyyyyPPPPrrrreeeessssssss----ccccoooommmmmmmmaaaa>>>>.
  184.  
  185.  
  186. BBBBIIIINNNNDDDDIIIINNNNGGGG SSSSCCCCRRRRIIIIPPPPTTTTSSSS AAAANNNNDDDD SSSSUUUUBBBBSSSSTTTTIIIITTTTUUUUTTTTIIIIOOOONNNNSSSS
  187.      The _s_c_r_i_p_t argument to bbbbiiiinnnndddd is a Tcl script, which will be executed
  188.      whenever the given event sequence occurs.  _C_o_m_m_a_n_d will be executed in
  189.      the same interpreter that the bbbbiiiinnnndddd command was executed in, and it will
  190.      run at global level (only global variables will be accessible).  If
  191.      _s_c_r_i_p_t contains any %%%% characters, then the script will not be executed
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. bbbbiiiinnnndddd((((3333TTTTkkkk))))                                                            bbbbiiiinnnndddd((((3333TTTTkkkk))))
  203.  
  204.  
  205.  
  206.      directly.  Instead, a new script will be generated by replacing each %%%%,
  207.      and the character following it, with information from the current event.
  208.      The replacement depends on the character following the %%%%, as defined in
  209.      the list below.  Unless otherwise indicated, the replacement string is   |
  210.      the decimal value of the given field from the current event.  Some of the
  211.      substitutions are only valid for certain types of events;  if they are
  212.      used for other types of events the value substituted is undefined.
  213.  
  214.      %%%%%%%%   Replaced with a single percent.
  215.  
  216.      %%%%####   The number of the last client request processed by the server (the
  217.           _s_e_r_i_a_l field from the event).  Valid for all event types.
  218.  
  219.      %%%%aaaa   The _a_b_o_v_e field from the event, formatted as a hexadecimal number.  |
  220.           Valid only for CCCCoooonnnnffffiiiigggguuuurrrreeee events.
  221.  
  222.      %%%%bbbb   The number of the button that was pressed or released.  Valid only
  223.           for BBBBuuuuttttttttoooonnnnPPPPrrrreeeessssssss and BBBBuuuuttttttttoooonnnnRRRReeeelllleeeeaaaasssseeee events.
  224.  
  225.      %%%%cccc   The _c_o_u_n_t field from the event.  Valid only for EEEExxxxppppoooosssseeee events.
  226.  
  227.      %%%%dddd   The _d_e_t_a_i_l field from the event.  The %%%%dddd is replaced by a string
  228.           identifying the detail.  For EEEEnnnntttteeeerrrr, LLLLeeeeaaaavvvveeee, FFFFooooccccuuuussssIIIInnnn, and FFFFooooccccuuuussssOOOOuuuutttt
  229.           events, the string will be one of the following:
  230.  
  231.                NNNNoooottttiiiiffffyyyyAAAAnnnncccceeeessssttttoooorrrr          NNNNoooottttiiiiffffyyyyNNNNoooonnnnlllliiiinnnneeeeaaaarrrrVVVViiiirrrrttttuuuuaaaallll
  232.                NNNNoooottttiiiiffffyyyyDDDDeeeettttaaaaiiiillllNNNNoooonnnneeee        NNNNoooottttiiiiffffyyyyPPPPooooiiiinnnntttteeeerrrr
  233.                NNNNoooottttiiiiffffyyyyIIIInnnnffffeeeerrrriiiioooorrrr          NNNNoooottttiiiiffffyyyyPPPPooooiiiinnnntttteeeerrrrRRRRooooooootttt
  234.                NNNNoooottttiiiiffffyyyyNNNNoooonnnnlllliiiinnnneeeeaaaarrrr         NNNNoooottttiiiiffffyyyyVVVViiiirrrrttttuuuuaaaallll
  235.  
  236.           For events other than these, the substituted string is undefined.
  237.  
  238.      %%%%ffff   The _f_o_c_u_s field from the event (0000 or 1111).  Valid only for EEEEnnnntttteeeerrrr and
  239.           LLLLeeeeaaaavvvveeee events.
  240.  
  241.      %%%%hhhh   The _h_e_i_g_h_t field from the event.  Valid only for CCCCoooonnnnffffiiiigggguuuurrrreeee, EEEExxxxppppoooosssseeee,
  242.           and GGGGrrrraaaapppphhhhiiiiccccssssEEEExxxxppppoooosssseeee events.
  243.  
  244.      %%%%kkkk   The _k_e_y_c_o_d_e field from the event.  Valid only for KKKKeeeeyyyyPPPPrrrreeeessssssss and
  245.           KKKKeeeeyyyyRRRReeeelllleeeeaaaasssseeee events.
  246.  
  247.      %%%%mmmm   The _m_o_d_e field from the event.  The substituted string is one of
  248.           NNNNoooottttiiiiffffyyyyNNNNoooorrrrmmmmaaaallll, NNNNoooottttiiiiffffyyyyGGGGrrrraaaabbbb, NNNNoooottttiiiiffffyyyyUUUUnnnnggggrrrraaaabbbb, or NNNNoooottttiiiiffffyyyyWWWWhhhhiiiilllleeeeGGGGrrrraaaabbbbbbbbeeeedddd.
  249.           Valid only for EEEEnnnntttteeeerrrrWWWWiiiinnnnddddoooowwww, FFFFooooccccuuuussssIIIInnnn, FFFFooooccccuuuussssOOOOuuuutttt, and LLLLeeeeaaaavvvveeeeWWWWiiiinnnnddddoooowwww
  250.           events.
  251.  
  252.      %%%%oooo   The _o_v_e_r_r_i_d_e__r_e_d_i_r_e_c_t field from the event.  Valid only for MMMMaaaapppp,
  253.           RRRReeeeppppaaaarrrreeeennnntttt, and CCCCoooonnnnffffiiiigggguuuurrrreeee events.
  254.  
  255.      %%%%pppp   The _p_l_a_c_e field from the event, substituted as one of the strings
  256.           PPPPllllaaaacccceeeeOOOOnnnnTTTToooopppp or PPPPllllaaaacccceeeeOOOOnnnnBBBBoooottttttttoooommmm.  Valid only for CCCCiiiirrrrccccuuuullllaaaatttteeee events.
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. bbbbiiiinnnndddd((((3333TTTTkkkk))))                                                            bbbbiiiinnnndddd((((3333TTTTkkkk))))
  269.  
  270.  
  271.  
  272.      %%%%ssss   The _s_t_a_t_e field from the event.  For BBBBuuuuttttttttoooonnnnPPPPrrrreeeessssssss, BBBBuuuuttttttttoooonnnnRRRReeeelllleeeeaaaasssseeee,
  273.           EEEEnnnntttteeeerrrr, KKKKeeeeyyyyPPPPrrrreeeessssssss, KKKKeeeeyyyyRRRReeeelllleeeeaaaasssseeee, LLLLeeeeaaaavvvveeee, and MMMMoooottttiiiioooonnnn events, a decimal    |
  274.           string is substituted.  For VVVViiiissssiiiibbbbiiiilllliiiittttyyyy, one of the strings
  275.           VVVViiiissssiiiibbbbiiiilllliiiittttyyyyUUUUnnnnoooobbbbssssccccuuuurrrreeeedddd, VVVViiiissssiiiibbbbiiiilllliiiittttyyyyPPPPaaaarrrrttttiiiiaaaallllllllyyyyOOOObbbbssssccccuuuurrrreeeedddd, and
  276.           VVVViiiissssiiiibbbbiiiilllliiiittttyyyyFFFFuuuullllllllyyyyOOOObbbbssssccccuuuurrrreeeedddd is substituted.
  277.  
  278.      %%%%tttt   The _t_i_m_e field from the event.  Valid only for events that contain a
  279.           _t_i_m_e field.
  280.  
  281.      %%%%wwww   The _w_i_d_t_h field from the event.  Valid only for CCCCoooonnnnffffiiiigggguuuurrrreeee, EEEExxxxppppoooosssseeee,
  282.           and GGGGrrrraaaapppphhhhiiiiccccssssEEEExxxxppppoooosssseeee events.
  283.  
  284.      %%%%xxxx   The _x field from the event.  Valid only for events containing an _x
  285.           field.
  286.  
  287.      %%%%yyyy   The _y field from the event.  Valid only for events containing a _y
  288.           field.
  289.  
  290.      %%%%AAAA   Substitutes the ASCII character corresponding to the event, or the
  291.           empty string if the event doesn't correspond to an ASCII character
  292.           (e.g. the shift key was pressed).  XXXXLLLLooooooookkkkuuuuppppSSSSttttrrrriiiinnnngggg does all the work
  293.           of translating from the event to an ASCII character.  Valid only for
  294.           KKKKeeeeyyyyPPPPrrrreeeessssssss and KKKKeeeeyyyyRRRReeeelllleeeeaaaasssseeee events.
  295.  
  296.      %%%%BBBB   The _b_o_r_d_e_r__w_i_d_t_h field from the event.  Valid only for CCCCoooonnnnffffiiiigggguuuurrrreeee
  297.           events.
  298.  
  299.      %%%%EEEE   The _s_e_n_d__e_v_e_n_t field from the event.  Valid for all event types.
  300.  
  301.      %%%%KKKK   The keysym corresponding to the event, substituted as a textual
  302.           string.  Valid only for KKKKeeeeyyyyPPPPrrrreeeessssssss and KKKKeeeeyyyyRRRReeeelllleeeeaaaasssseeee events.
  303.  
  304.      %%%%NNNN   The keysym corresponding to the event, substituted as a decimal     |
  305.           number.  Valid only for KKKKeeeeyyyyPPPPrrrreeeessssssss and KKKKeeeeyyyyRRRReeeelllleeeeaaaasssseeee events.
  306.  
  307.      %%%%RRRR   The _r_o_o_t window identifier from the event.  Valid only for events
  308.           containing a _r_o_o_t field.
  309.  
  310.      %%%%SSSS   The _s_u_b_w_i_n_d_o_w window identifier from the event, formatted as a      |
  311.           hexadecimal number.  Valid only for events containing a _s_u_b_w_i_n_d_o_w
  312.           field.
  313.  
  314.      %%%%TTTT   The _t_y_p_e field from the event.  Valid for all event types.
  315.  
  316.      %%%%WWWW   The path name of the window to which the event was reported (the
  317.           _w_i_n_d_o_w field from the event).  Valid for all event types.
  318.  
  319.      %%%%XXXX   The _x__r_o_o_t field from the event.  If a virtual-root window manager  |
  320.           is being used then the substituted value is the corresponding x-    |
  321.           coordinate in the virtual root.  Valid only for BBBBuuuuttttttttoooonnnnPPPPrrrreeeessssssss,
  322.           BBBBuuuuttttttttoooonnnnRRRReeeelllleeeeaaaasssseeee, KKKKeeeeyyyyPPPPrrrreeeessssssss, KKKKeeeeyyyyRRRReeeelllleeeeaaaasssseeee, and MMMMoooottttiiiioooonnnn events.
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. bbbbiiiinnnndddd((((3333TTTTkkkk))))                                                            bbbbiiiinnnndddd((((3333TTTTkkkk))))
  335.  
  336.  
  337.  
  338.      %%%%YYYY   The _y__r_o_o_t field from the event.  If a virtual-root window manager  |
  339.           is being used then the substituted value is the corresponding y-    |
  340.           coordinate in the virtual root.  Valid only for BBBBuuuuttttttttoooonnnnPPPPrrrreeeessssssss,
  341.           BBBBuuuuttttttttoooonnnnRRRReeeelllleeeeaaaasssseeee, KKKKeeeeyyyyPPPPrrrreeeessssssss, KKKKeeeeyyyyRRRReeeelllleeeeaaaasssseeee, and MMMMoooottttiiiioooonnnn events.
  342.  
  343.      The replacement string for a %-replacement is formatted as a proper Tcl  |
  344.      list element.  This means that it will be surrounded with braces if it   |
  345.      contains spaces, or special characters such as $$$$ and {{{{ may be preceded by|
  346.      backslashes.  This guarantees that the string will be passed through the |
  347.      Tcl parser when the binding script is evaluated.  Most replacements are  |
  348.      numbers or well-defined strings such as AAAAbbbboooovvvveeee;  for these replacements no|
  349.      special formatting is ever necessary.  The most common case where        |
  350.      reformatting occurs is for the %%%%AAAA substitution.  For example, if _s_c_r_i_p_t  |
  351.      is                                                                       |
  352.  
  353.           iiiinnnnsssseeeerrrrtttt %%%%AAAA                                                           |
  354.  
  355.      and the character typed is an open square bracket, then the script       |
  356.      actually executed will be                                                |
  357.  
  358.           iiiinnnnsssseeeerrrrtttt \\\\[[[[                                                           |
  359.  
  360.      This will cause the iiiinnnnsssseeeerrrrtttt to receive the original replacement string    |
  361.      (open square bracket) as its first argument.  If the extra backslash     |
  362.      hadn't been added, Tcl would not have been able to parse the script      |
  363.      correctly.
  364.  
  365.  
  366. MMMMUUUULLLLTTTTIIIIPPPPLLLLEEEE MMMMAAAATTTTCCCCHHHHEEEESSSS
  367.      It is possible for several bindings to match a given X event.  If the    |
  368.      bindings are associated with different _t_a_g's, then each of the bindings  |
  369.      will be executed, in order.  By default, a class binding will be executed|
  370.      first, followed by a binding for the widget, a binding for its toplevel, |
  371.      and an aaaallllllll binding.  The bbbbiiiinnnnddddttttaaaaggggssss command may be used to change this     |
  372.      order for a particular window or to associate additional binding tags    |
  373.      with the window.                                                         |
  374.  
  375.      The ccccoooonnnnttttiiiinnnnuuuueeee and bbbbrrrreeeeaaaakkkk commands may be used inside a binding script to   |
  376.      control the processing of matching scripts.  If ccccoooonnnnttttiiiinnnnuuuueeee is invoked, then|
  377.      the current binding script is terminated but Tk will continue processing |
  378.      binding scripts associated with other _t_a_g's.  If the bbbbrrrreeeeaaaakkkk command is    |
  379.      invoked within a binding script, then that script terminates and no other|
  380.      scripts will be invoked for the event.                                   |
  381.  
  382.      If more than one binding matches a particular event and they have the    |
  383.      same _t_a_g, then the most specific binding is chosen and its script is     |
  384.      evaluated.  The following tests are applied, in order, to determine which|
  385.      of several matching sequences is more specific:  (a) a longer sequence   |
  386.      (in terms of number of events matched) is more specific than a shorter   |
  387.      sequence; (b) an event pattern that specifies a specific button or key is|
  388.      more specific than one that doesn't; (c) if the modifiers specified in   |
  389.      one pattern are a subset of the modifiers in another pattern, then the   |
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. bbbbiiiinnnndddd((((3333TTTTkkkk))))                                                            bbbbiiiinnnndddd((((3333TTTTkkkk))))
  401.  
  402.  
  403.  
  404.      pattern with more modifiers is more specific.  If the matching sequences
  405.      contain more than one event, then tests (c)-(e) are applied in order from
  406.      the most recent event to the least recent event in the sequences.  If
  407.      these tests fail to determine a winner, then the most recently registered
  408.      sequence is the winner.
  409.  
  410.      If an X event does not match any of the existing bindings, then the event
  411.      is ignored.  An unbound event is not considered to be an error.
  412.  
  413.  
  414. MMMMUUUULLLLTTTTIIII----EEEEVVVVEEEENNNNTTTT SSSSEEEEQQQQUUUUEEEENNNNCCCCEEEESSSS AAAANNNNDDDD IIIIGGGGNNNNOOOORRRREEEEDDDD EEEEVVVVEEEENNNNTTTTSSSS
  415.      When a _s_e_q_u_e_n_c_e specified in a bbbbiiiinnnndddd command contains more than one event
  416.      pattern, then its script is executed whenever the recent events (leading
  417.      up to and including the current event) match the given sequence.  This
  418.      means, for example, that if button 1 is clicked repeatedly the sequence
  419.      <<<<DDDDoooouuuubbbblllleeee----BBBBuuuuttttttttoooonnnnPPPPrrrreeeessssssss----1111>>>> will match each button press but the first.  If   |
  420.      extraneous events that would prevent a match occur in the middle of an   |
  421.      event sequence then the extraneous events are ignored unless they are    |
  422.      KKKKeeeeyyyyPPPPrrrreeeessssssss or BBBBuuuuttttttttoooonnnnPPPPrrrreeeessssssss events.  For example, <<<<DDDDoooouuuubbbblllleeee----BBBBuuuuttttttttoooonnnnPPPPrrrreeeessssssss----1111>>>> will|
  423.      match a sequence of presses of button 1, even though there will be       |
  424.      BBBBuuuuttttttttoooonnnnRRRReeeelllleeeeaaaasssseeee events (and possibly MMMMoooottttiiiioooonnnn events) between the BBBBuuuuttttttttoooonnnnPPPPrrrreeeessssssss|
  425.      events.  Furthermore, a KKKKeeeeyyyyPPPPrrrreeeessssssss event may be preceded by any number of  |
  426.      other KKKKeeeeyyyyPPPPrrrreeeessssssss events for modifier keys without the modifier keys        |
  427.      preventing a match.  For example, the event sequence aaaaBBBB will match a     |
  428.      press of the aaaa key, a release of the aaaa key, a press of the SSSShhhhiiiifffftttt key, and|
  429.      a press of the bbbb key:  the press of SSSShhhhiiiifffftttt is ignored because it is a     |
  430.      modifier key.  Finally, if several MMMMoooottttiiiioooonnnn events occur in a row, only the
  431.      last one is used for purposes of matching binding sequences.
  432.  
  433.  
  434. EEEERRRRRRRROOOORRRRSSSS
  435.      If an error occurs in executing the script for a binding then the ttttkkkkeeeerrrrrrrroooorrrr
  436.      mechanism is used to report the error.  The ttttkkkkeeeerrrrrrrroooorrrr command will be      |
  437.      executed at global level (outside the context of any Tcl procedure).
  438.  
  439.  
  440. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  441.      tkerror
  442.  
  443.  
  444. KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  445.      form, manual
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.                                                                         PPPPaaaaggggeeee 7777
  460.  
  461.  
  462.  
  463.